package com.restaurant.application.bookingset;

import com.nebutown.description.UnitDescription;
import com.nebutown.generation.BeanSpec;
import com.nebutown.generation.basictype.UID;

public class BookingSetDesc extends UnitDescription {

    public static void main(String[] args) {
        getUnitDescription().run("./");
    }

    private static UnitDescription getUnitDescription() {
        UnitDescription desc = UnitDescription.basicUnit(BookingSet.class, "BookingSetData");
        desc.nextBean("BookingSetData")
                .add("id", String.class)
                .add("shopUid", UID.class)
                .add("shopId", String.class)
                .add("shopName", String.class)
                .add("startDate", String.class)
                .add("endDate", String.class)
                .add("times", BeanSpec.listOf("TimesData"))
                .add("service", BeanSpec.listOf("String"))
                .add("createTime", Long.class)
                .add("modifyTime", Long.class)
        ;
        desc.nextBean("TimesData")
                .add("startTime", String.class)
                .add("endTime", String.class)
        ;

        desc.addUiFunction("save", "BookingSetData");
        return desc;
    }
}
